package com.ruoyi.net.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.net.mapper.ElementBusiMtnChannelOtherMapper;
import com.ruoyi.net.domain.ElementBusiMtnChannelOther;
import com.ruoyi.net.service.IElementBusiMtnChannelOtherService;

/**
 * 网元-业务-MTN Channel-其他属性Service业务层处理
 * 
 * @author tony
 * @date 2024-12-08
 */
@Service
public class ElementBusiMtnChannelOtherServiceImpl implements IElementBusiMtnChannelOtherService 
{
    @Autowired
    private ElementBusiMtnChannelOtherMapper elementBusiMtnChannelOtherMapper;

    /**
     * 查询网元-业务-MTN Channel-其他属性
     * 
     * @param id 网元-业务-MTN Channel-其他属性主键
     * @return 网元-业务-MTN Channel-其他属性
     */
    @Override
    public ElementBusiMtnChannelOther selectElementBusiMtnChannelOtherById(String id)
    {
        return elementBusiMtnChannelOtherMapper.selectElementBusiMtnChannelOtherById(id);
    }

    /**
     * 查询网元-业务-MTN Channel-其他属性列表
     * 
     * @param elementBusiMtnChannelOther 网元-业务-MTN Channel-其他属性
     * @return 网元-业务-MTN Channel-其他属性
     */
    @Override
    public List<ElementBusiMtnChannelOther> selectElementBusiMtnChannelOtherList(ElementBusiMtnChannelOther elementBusiMtnChannelOther)
    {
        return elementBusiMtnChannelOtherMapper.selectElementBusiMtnChannelOtherList(elementBusiMtnChannelOther);
    }

    /**
     * 新增网元-业务-MTN Channel-其他属性
     * 
     * @param elementBusiMtnChannelOther 网元-业务-MTN Channel-其他属性
     * @return 结果
     */
    @Override
    public int insertElementBusiMtnChannelOther(ElementBusiMtnChannelOther elementBusiMtnChannelOther)
    {
        String uuid = IdUtils.simpleUUID();
        if (StringUtils.isEmpty(elementBusiMtnChannelOther.getId())) {
            elementBusiMtnChannelOther.setId(uuid);
        }
        elementBusiMtnChannelOther.setCreateBy(SecurityUtils.getUsername());
        elementBusiMtnChannelOther.setCreateTime(DateUtils.getNowDate());
        elementBusiMtnChannelOther.setUpdateBy(SecurityUtils.getUsername());
        elementBusiMtnChannelOther.setUpdateTime(DateUtils.getNowDate());
        return elementBusiMtnChannelOtherMapper.insertElementBusiMtnChannelOther(elementBusiMtnChannelOther);
    }

    /**
     * 修改网元-业务-MTN Channel-其他属性
     * 
     * @param elementBusiMtnChannelOther 网元-业务-MTN Channel-其他属性
     * @return 结果
     */
    @Override
    public int updateElementBusiMtnChannelOther(ElementBusiMtnChannelOther elementBusiMtnChannelOther)
    {
        elementBusiMtnChannelOther.setUpdateBy(SecurityUtils.getUsername());
        elementBusiMtnChannelOther.setUpdateTime(DateUtils.getNowDate());
        return elementBusiMtnChannelOtherMapper.updateElementBusiMtnChannelOther(elementBusiMtnChannelOther);
    }

    /**
     * 批量删除网元-业务-MTN Channel-其他属性
     * 
     * @param ids 需要删除的网元-业务-MTN Channel-其他属性主键
     * @return 结果
     */
    @Override
    public int deleteElementBusiMtnChannelOtherByIds(String[] ids)
    {
        return elementBusiMtnChannelOtherMapper.deleteElementBusiMtnChannelOtherByIds(ids);
    }

    /**
     * 删除网元-业务-MTN Channel-其他属性信息
     * 
     * @param id 网元-业务-MTN Channel-其他属性主键
     * @return 结果
     */
    @Override
    public int deleteElementBusiMtnChannelOtherById(String id)
    {
        return elementBusiMtnChannelOtherMapper.deleteElementBusiMtnChannelOtherById(id);
    }
}
